import request from '@/utils/request'

export function List(params: any) {
  return request({
    method: 'get',
    url: '/admin',
    params
  })
}

export function DeleteData(id: any) {
  return request({
    method: 'delete',
    url: '/admin',
    data: id
  })
}

export function Query(id: any) {
  return request({
    method: 'get',
    url: `/admin/${id}`,
  })
}

export function Add(data: any) {
  return request({
    method: 'post',
    url: '/admin',
    data
  })
}
export function EditData(data: any) {
  return request({
    method: 'put',
    url: '/admin',
    data
  })
}